package com.yyk.config.commonService.enumeration;

/**
 * @author matjx
 */

public enum HttpStatusEnum {
    /**
     * web返回码
     */

    HTTP_OK("HTTP_OK", 200, "请求成功"),
    HTTP_BAD_REQUEST("HTTP_BAD_REQUEST", 400, ""),
    HTTP_UNAUTHORIZED("HTTP_UNAUTHORIZED", 401, ""),
    HTTP_NOT_FOUND("HTTP_NOT_FOUND", 404, ""),
    HTTP_INTERNAL_ERROR("HTTP_INTERNAL_ERROR", 500, "服务异常"),
    HTTP_BAD_GATEWAY("HTTP_BAD_GATEWAY", 502, ""),
    HTTP_GATEWAY_TIMEOUT("HTTP_GATEWAY_TIMEOUT", 504, ""),
    HTTP_AUTO_RUNTIME("HTTP_AUTO_RUNTIME", 800, "自定义业务异常"),
    HTTP_REQUEST_FREQUENT("HTTP_REQUEST_FREQUENT", 911, "请求过于频繁")

    ;

    private String name;
    private Integer code;
    private String desc;

    HttpStatusEnum(String name, Integer code, String desc) {
        this.name = name;
        this.code = code;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
